From a0e8d8db0bfc3f3c4a1120b77aa6b2eb01e99eea Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 1 Jul 2015 19:15:56 -0700 Subject: [PATCH] Improve the font options support Instead of just overwriting the default options, merge the per-widget font options with the defaults. https://bugzilla.gnome.org/show_bug.cgi?id=751811 --- gtk/gtkwidget.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 9360f80ff1..f537433418 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -10338,10 +10338,14 @@ update_pango_context (GtkWidget *widget, screen = gtk_widget_get_screen_unchecked (widget); if (widget->priv->font_options) { - pango_cairo_context_set_font_options (context, - widget->priv->font_options); + cairo_font_options_t *options; + + options = cairo_font_options_copy (gdk_screen_get_font_options (screen)); + cairo_font_options_merge (options, widget->priv->font_options); + pango_cairo_context_set_font_options (context, options); + cairo_font_options_destroy (options); } - else if (screen) + else { pango_cairo_context_set_font_options (context, gdk_screen_get_font_options (screen)); -- 2.30.2